<template >
  <div class="main">
    <div class="container">
      <Usercenter class="userinfo"></Usercenter>
      <div class="info">
        <div class="title">个人信息</div>
        <div class="sep"></div>
        <div class="item">
          <div class="name"><i class="el-icon-user"></i>头像</div>
          <div class="value">
            <img :src="avatar" alt="用户头像" />
          </div>
          <div class="operation"></div>
        </div>
        <div class="item">
          <div class="name"><i class="el-icon-tickets"></i>昵称</div>
          <div class="value">
            {{ name }}
          </div>
          <div class="operation">修改</div>
        </div>
        <div class="item">
          <div class="name"><i class="el-icon-mobile-phone"></i>手机号码</div>
          <div class="value">
            {{ phone ? phone : "未绑定" }}
          </div>
          <div class="operation">更换</div>
        </div>
        <div class="item">
          <div class="name"><i class="el-icon-lock"></i>登录密码</div>
          <div class="value">*************</div>
          <div class="operation">重置密码</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Usercenter from "@/components/usercenter.vue";
import { mapGetters } from "vuex";

export default {
  components: { Usercenter },
  computed: {
    ...mapGetters([
      "sid",
      "uid",
      "is_vip",
      "name",
      "avatar",
      "showLogin",
      "phone",
    ]),
  },
  head() {
    return {
      title: "基本信息-个人中心",
    };
  },
  methods: {},
};
</script>

<style lang="less" scoped>
.main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px 0;
}

.container {
  width: 100%;
  max-width: 1250px;

  display: flex;
}

.userinfo {
  width: 260px;
  background: white;
  margin-right: 20px;
}

.info {
  width: calc(100% - 280px);
  background: white;
  padding: 20px;
  font-size: 16px;
  min-height: 50px;
  font-weight: 700;
  background-color: #fff;
  color: #333;
  display: flex;
  align-items: center;
  flex-direction: column;
}

.sep {
  width: 100%;
  height: 1px;
  background: #e9ebee;
  margin: 20px 0;
}

.item {
  width: 100%;
  justify-content: space-between;
  display: flex;
  height: 80px;
  align-items: center;
  font-weight: 400;
}

.name {
  width: 200px;
  color: #999;
  i {
    margin-right: 8px;
  }
}

.value {
  width: 200px;
  text-align: center;
  color: #101010;
  img {
    width: 60px;
    height: 60px;
    border-radius: 30px;
  }
}

.operation {
  width: 200px;
  color: #3370ff;
  cursor: pointer;
  text-align: right;
}
</style>